package com.member.shop.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.member.shop.domain.SysBizCouponGrant;
import org.apache.ibatis.annotations.Param;

/**
 * 优惠券发放Mapper接口
 *
 * @author lixinchen
 * @date 2024-05-08
 */
public interface SysBizCouponGrantMapper extends BaseMapper<SysBizCouponGrant>
{
    /**
     * 查询优惠券发放
     *
     * @param id 优惠券发放主键
     * @return 优惠券发放
     */
    public SysBizCouponGrant selectSysBizCouponGrantById(Long id);

    /**
     * 查询优惠券发放列表
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 优惠券发放集合
     */
    public List<SysBizCouponGrant> selectSysBizCouponGrantList(SysBizCouponGrant sysBizCouponGrant);

    /**
     * 新增优惠券发放
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 结果
     */
    public int insertSysBizCouponGrant(SysBizCouponGrant sysBizCouponGrant);

    /**
     * 修改优惠券发放
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 结果
     */
    public int updateSysBizCouponGrant(SysBizCouponGrant sysBizCouponGrant);

    /**
     * 删除优惠券发放
     *
     * @param id 优惠券发放主键
     * @return 结果
     */
    public int deleteSysBizCouponGrantById(Long id);

    /**
     * 批量删除优惠券发放
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysBizCouponGrantByIds(Long[] ids);

    Long selectCouponCount(@Param("userPhone") String userPhone,@Param("couponId") Long couponId);
}